<template>
  <div>
    <h1>movie</h1>
    <p>count组件中的num--{{ num }}</p>
    <button @click="getMovieList">获取电影列表</button>
    <ul>
      <li v-for="item in movieList" :key="item.albumId">
        {{ item.albumName }}
      </li>
    </ul>
  </div>
</template>

<script lang="ts">
  import { defineComponent } from "vue";
  export default defineComponent({
    name: "",
  });
</script>
<script lang="ts" setup>
  import useMovieState from "@/store/movie";
  import useCountState from "@/store/count";
  import { storeToRefs } from "pinia";

  const countState = useCountState();
  const movieState = useMovieState();

  const { num } = storeToRefs(countState);
  const { movieList } = storeToRefs(movieState);

  const { getMovieList } = movieState;
</script>

<style lang="scss" scoped></style>
